package com.edu.controller;


import com.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.edu.entity.CrmBanner;
import com.edu.service.CrmBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2021-07-02
 */
@RestController
@RequestMapping("/educms/bannerfront")
@CrossOrigin
public class BannerFrontController {

	@Autowired
	private CrmBannerService bannerService;

	//查询所用banner
	@GetMapping("/getAllBanner")
	public R getAllBanner(){
		List<CrmBanner> list = bannerService.selectAllBanner();
//		System.out.println(list);
		return R.ok().data("list",list);
	}
}

